<html>
<body>
<?php   
    $request = 'http://local.yahooapis.com/MapsService/V1/mapImage?appid=YD-bGrhXEw_JXyniyYzf1l6_NzPNWbPu6Ey5Q--';
	$request .= '&latitude=45.40630287&longitude=-75.65534603&zoom=1&output=php';
	$request .= '&image_width=1024&image_height=1024';
  
    $response = file_get_contents($request);  
      
    if ($response === false) {  
        die('Request failed');  
    }  
  
    $phpobj = unserialize($response);  
	
	copy ($phpobj["Result"], "/Users/scott/Sites/gps/maps/TEST.png");

    echo '<img src="'.$phpobj["Result"].'">';  
?>
</body>
</html>